#ifndef _OBJECTLOADER_H_
#define _OBJECTLOADER_H_

#include "stdafx.h"

class CObjectLoader :	public ICompoentLoader,
						public ILibManager, 
						public CUnknownImp 
{
public:
	CObjectLoader(void);
	virtual ~CObjectLoader(void);

	BEGIN_STDCOM_MAP
		STDCOM_INTERFACE_ENTRY_UNKNOWN_(ICompoentLoader)
		STDCOM_INTERFACE_ENTRY(ICompoentLoader)
		STDCOM_INTERFACE_ENTRY(ILibManager)
	END_STDCOM_MAP

public:
	//ICompoentLoader
	std_method(CreateInstance)(IBase* rot, REFCLSID clsid, IBase* punk, REFIID iid, void **ppv);
	std_method_(LPCSTR, ProgIDFromCLSID)(REFCLSID clsid);
	std_method_(CLSID, CLSIDFromProgID)(LPCSTR lpProgId);
public:
	//IlibManager
	std_method(Load)(LPSTRING path, LPCSTR name);
	std_method(Free)();
	std_method_(DWORD, GetCount)();
private:

	ClsIdTable		m_mapCls;
	ContainerTable	m_mapContainer;
	CAutoLock		m_lockSection;
};
#endif
